package com.achievement.service;

import com.achievement.domain.dto.honor.ExpertReviewDTO;
import com.achievement.domain.dto.honor.ExpertReviewResultDTO;
import com.achievement.domain.dto.honor.HonorApplyBookExpertReviewDTO;
import com.achievement.domain.dto.honor.ReviewResultDTO;
import com.achievement.domain.entity.ExpertReviewEntity;
import com.achievement.domain.param.honor.ExpertReviewParam;
import com.achievement.domain.vo.honor.ExpertGroupVO;
import com.achievement.domain.vo.honor.ExpertReviewVO;
import com.achievement.domain.vo.honor.AchievementExpertVO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IExpertReviewService extends IService<ExpertReviewEntity> {
    List<ExpertReviewVO> selectByPage(ExpertReviewParam param);

    List<ExpertReviewEntity> getListByConditions(ExpertReviewDTO ExpertReviewDTO);
    ExpertReviewVO getInfoById(String id);

    boolean add(ExpertReviewDTO dto);

    boolean update(ExpertReviewDTO dto);

    boolean batchRemove(List<String> ids);

    /**
     * 调整评审专家
     * @param dto
     * @return
     */
    boolean addOrUpdateExpertReview(HonorApplyBookExpertReviewDTO dto);

    /**
     * 根据查询条件获取专家审核信息
     * @param expertReviewQueryWrapper
     * @return
     */
    List<ExpertReviewVO> selectByLambdaQueryWrapper(LambdaQueryWrapper<ExpertReviewEntity> expertReviewQueryWrapper);

    /**
     * 获取专家分组信息
     * @return
     */
    List<ExpertGroupVO> expertGroupList();
    /**
     * 根据分组ID获取该分组下所有专家信息
     * @return
     */
    List<AchievementExpertVO> expertListByGroup(String id);

    /**
     * 专家拒绝评审
     * @param dto
     * @param expertId
     * @return
     */
    boolean refuseReviewByExpert(ExpertReviewDTO dto,String expertId);

    /**
     * 专家提交评审
     * @param dto
     * @return
     */
    boolean reviewByExpert(ExpertReviewResultDTO dto,String expertId);
    /**
     * 专家将暂存的提交评审
     * @param reviewObjectIds
     * @return
     */
    boolean reviewNoSubmitByExpert(String reviewObjectIds,String expertId);
    /**
     * 验证专家提交分数不能为负数
     * @param reviewResultDTOs
     * @return
     */
    boolean checkMark(List<ReviewResultDTO>  reviewResultDTOs);
    /**
     * 获评审专家id
     * @param expertId
     * @return
     */
    String getReviewerIdByExpertId(String expertId);
}
